<?php

namespace app\admin\controller\app;

use app\common\controller\Backend;
use think\Exception;
use think\Request;

class Storelist extends Backend
{
    protected $model = null;

    public function _initialize(Request $request = null)
    {
        parent::_initialize();
        $this->model = model('StoreList');
    }

    /**
     * app应用列表
     *
     * @throws Exception
     */
    public function list()
    {
        # 获取app应用列表
        $this->request->filter(['strip_tags', 'trim']);
//        if ($this->request->isAjax()) {
//            list($where, $sort, $order, $offset, $limit) = $this->buildparams();
//            $list = $this->model
//                ->where($where)
//                ->field('app_name,app_identifying_id,app_logo,app_android_down_url,app_ios_down_url', true)
//                ->order($sort, $order)
//                ->paginate($limit);
//            $result = array("total" => $list->total(), "rows" => $list->items());
//            return json($result);
//        }
        return $this->view->fetch();
    }

    public function index()
    {
        # 获取app应用列表
        $this->request->filter(['strip_tags', 'trim']);
//        if ($this->request->isAjax()) {
//            list($where, $sort, $order, $offset, $limit) = $this->buildparams();
//            $list = $this->model
//                ->where($where)
//                ->field('app_name,app_identifying_id,app_logo,app_android_down_url,app_ios_down_url', true)
//                ->order($sort, $order)
//                ->paginate($limit);
//            $result = array("total" => $list->total(), "rows" => $list->items());
//            return json($result);
//        }
        return $this->view->fetch();
    }
}